<template>
  <div class="category">
    <el-menu
        :uniqueOpened="true"
        default-active="1"
        class="el-menu-vertical-demo"
        @open="handleOpen"
        @close="handleClose"
        background-color="white"
        text-color="black"
        active-text-color="#3185d9">
      <el-menu-item index="1" @click="allQAClick">
        <i class="el-icon-menu"></i>
        <template #title>所有问卷</template>
      </el-menu-item>
      <el-menu-item index="2" @click="trashQAClick">
        <i class="el-icon-delete"></i>
        <template #title>回收问卷</template>
      </el-menu-item>
    </el-menu>
  </div>

</template>

<script>
export default {
  name: "QACategoryCard",
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
    allQAClick() {
      console.log('all qa pressed')
      this.$emit('allqaclick')
    },
    trashQAClick() {
      console.log('pressed');
      this.$emit('trashclick')
    },
  }
}
</script>

<style scoped>
  .category {
    margin-top: 0;
    background-color: #3185d9;
  }

</style>